﻿package game.objects {
	import game.global.Global;
	import game.lang.Lang;
	import game.context.Context;
	import game.debug.Debug;
	import game.socket.Sockets;
	
	public class GameGlobal {
		
		public function set socket(value:Sockets):void { global.socket = value; }
		
		public function get socket():Sockets { return global.socket as Sockets; }
		
		public function set debug(value:Debug):void { global.debug = value; }
		
		public function get debug():Debug { return global.debug as Debug; }
		
		public function set context(value:Context):void { global.context = value; }
		
		public function get context():Context { return global.context as Context; }
		
		public function set lang(value:Lang):void { global.lang = value; }
		
		public function get lang():Lang { return global.lang as Lang; }
		
		public function set config(value:ConfigObject):void { global.config = value; };
		
		public function get config():ConfigObject { return ((global && global.config) ? global.config as ConfigObject : new ConfigObject ); }
		
		private function get global():Global { return Global.getInstance(); }
	}
}